import request from '@/utils/request'
/**
 * 
 */
/**
 * 库存盘点 
 */

/**
 * 查询
 * @param {*} data = {pageNo: 0, pageSize: 0, param: {accidentTypeDictId,storeId,tiltle}}
 */
export function page(form, pageSize, currentPage) {
    const data = {
        param: form,
        pageSize: pageSize,
        pageNo: currentPage
    }
    return request.post('/sq/brandCheckStorage/page', data)
}
/**
 * 查找详情
 * @param {}} id 
 */
export function findById(id) {
    return request.get(`/sq/brandCheckStorage/findById/${id}`)
}
/**
 * 新增 ｜ 修改
 * @param {*} form
 */
export function save(form={}) {
    return request.post('/sq/brandCheckStorage/save', form)
}

/**
 * 新增 ｜ 修改
 * @param {*} form
 */
export function update(form={}) {
    return request.put('/sq/brandCheckStorage/save', form)
}

/**
 * 删除
 * @param {*} id 
 */
export function deleteById(id) {
    return request.delete(`/sq/brandCheckStorage/del/${id}`)
}
/**
 * 仓位查询
 * @param {} form 
 * @param {*} pageSize 
 * @param {*} currentPage 
 */
export function storageSite(form, pageSize=100000, currentPage=1) {
    return request.post('/storageSite/page', {
      param: form,
      pageSize: pageSize,
      pageNo: currentPage
    })
  }
  
  
/** 
 * 生成出库编号
 * @param {}} 
 */
export function getStorageCode() {
    return request.get(`/sq/brandCheckStorage/getStorageCode`)
}
// 编辑详情
export function getFindById(id) {
    return request.get('/sq/brandCheckStorage/findById/' + id)
  }
  
  // 详情
  export function getDetail(id) {
    return request.get('/sq/brandCheckStorage/detail/' + id)
  }
    

// 盘点配件详情列表
export function checkPartsPage(form, pageSize, currentPage) {
    return request.post('/sq/brandCheckStorage/checkPartsPage', {
      param: form,
      pageSize: pageSize,
      pageNo: currentPage
    })
  }
